<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>

<body>
    <div id="app">
        <span>yahoo</span>
        <h2>
            <div id ='lll'>
                lll
            </div>
        </h2>
        <section>
            <div id='tom'>
                <div>tom</div>
            </div>
        </section>
        <div id='hello'>hello</div>
        <a href=""></a>
    </div>
    <script type='module'>
        import util from './util.js'
        Node.prototype.substr = util.substr
        let h2 = document.querySelector('h2')
        let div =document.querySelector('#lll')
        let section = document.querySelector('section')
        let tom=document.querySelector('#tom')
        // console.log(typeof(tom.textContent))
        util.removeChildNodeHasContent(section,'div','tom')
    </script>
</body>

</html>